package com.lefevre.cms.bean.message;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 系统通知
 *
 * @author Lefevre
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_notify")
@Entity
@Table(name = "sys_notify", indexes = {@Index(name = "systemNotify_1_idx", columnList = "sendTime")})
public class SystemNotify implements Serializable {
    private static final long serialVersionUID = 796537226963121494L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type = IdType.INPUT)
    private Long id;

    /**
     * 员工名称
     **/
    @Column(length = 30)
    @TableField("staffName")
    private String staffName;

    /**
     * 通知内容
     **/
    @Lob
    @TableField("content")
    private String content;

    /**
     * 发送时间
     **/
    @Temporal(TemporalType.TIMESTAMP)
    @TableField("sendTime")
    private Date sendTime = new Date();

}
